package com.yunian.common.Test;

import com.yunian.common.annotation.IngoreRespongseAdvice;
import com.yunian.common.execption.AdExecption;
import com.yunian.common.execption.PlanExecption;
import com.yunian.common.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/test")
public class ResponseDataAdviceTest {

    @Autowired
    TestService testService;

    @RequestMapping("/index")
    public Map Test() throws PlanExecption, AdExecption {

        HashMap<Object, Object> hashMap = new HashMap<>();
        hashMap.put("name","aaa");
        hashMap.put("age","17");
       //testService.test(1);
        return hashMap;
    }


    @RequestMapping("/index1")
    public Map Test1() throws AdExecption, PlanExecption {

        testService.test(2);
        return null;
    }


}
